package com.avic.modules.equipment.service.mapper;

import com.avic.common.mapper.CoreMapper;
import com.avic.modules.equipment.domain.Station;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zhangzikang
 * @date 2022-08-14
 */
@Repository
@Mapper
public interface StationMapper extends CoreMapper<Station> {

    @Select("select s.* FROM station s LEFT JOIN equipment e on s.id = e.stack_number WHERE e.equip_son = #{equipId}")
    List<Station> selectStation(@Param("equipId")String equipId);
}
